<?php
$this->Html->script('https://maps.google.com/maps/api/js?sensor=false', array('inline' => false));
$this->Html->script('presentation/rutas/mapa.js', array('inline' => false));
?>

<form action="/rutas/add" id="RutaAddForm" enctype="multipart/form-data" method="post" accept-charset="utf-8" onsubmit="plotear();
        return false;">
    <fieldset>
        <div class="titulo">
            <div>Filtro</div>
        </div>
        <?php
        $settings0 = array(
            "data" => array(
                'name' => 'codigo_trata',
                'label' => 'Código Trata',
                'presentation' => 'SUBSIDIOS::CODIGO_TRATA'
            )
        );
        echo $this->Presentation->getContent("renderMaintForm", $settings0);
        
        $settings = array(
            "data" => array(
                'name' => 'comuna',
                'label' => 'Comuna',
                'presentation' => 'COMUNAS'
            )
        );
        echo $this->Presentation->getContent("renderMaintForm", $settings);

        $settings2 = array(
            "data" => array(
                'name' => 'barrio',
                'label' => 'Barrio',
                'presentation' => 'BARRIOS'
            )
        );
        echo $this->Presentation->getContent("renderMaintForm", $settings2);

        $settings3 = array(
            "data" => array(
                'name' => 'calle',
                'label' => 'Calle'
            )
        );
        echo $this->Presentation->getContent("renderMaintForm", $settings3);

        $settings4 = array(
            "data" => array(
                'name' => 'altura',
                'label' => 'Altura'
            )
        );
        echo $this->Presentation->getContent("renderMaintForm", $settings4);
        ?>

        <div class="submit"><input type="submit" value="Plotear"></div>
        <a href="<?= WWW ?>rutas/index" id="cancelButton" class="cancelar">Cancelar</a>
    </fieldset>

    <fieldset>
        <div class="titulo">
            <div>Mapa</div>
        </div>
        <br />

        <div class="column">
            <div id="mapa" style="width: 640px; height: 500px;"></div>
        </div>
        <div class="column">
            <a href="javascript:void(0);" class="k-button" id="buttonGenerarRuta"><span class="k-icon k-i-plus"></span>Generar Ruta</a>
        </div>

        <div id="windowConfirmarRuta"></div>
    </fieldset>
</form>

<div id="loading-subsidios">Cargando datos</div>